<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 作业1.用数组map方法处理['张三','李四','王五'] => [{uname:'张三',age:18},{uname:'李四',age:18},{uname:'王五',age:18}]

    let arr = ['张三','李四','王五']
 const res =  arr.map(function(item){
      // console.log(item)
      return  { uname: item, age: 18}
    })
    console.log(res)
  </script>
</body>
</html>